3.124 \(\int \frac {(f+g x)^2}{\sqrt {a+b \log (c (d+e x)^n)}} \, dx\)

Optimal. Leaf size=283 \[ \frac {\sqrt {2 \pi } g e^{-\frac {2 a}{b n}} (d+e x)^2 (e f-d g) \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}+\frac {\sqrt {\pi } e^{-\frac {a}{b n}} (d+e x) (e f-d g)^2 \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}+\frac {\sqrt {\frac {\pi }{3}} g^2 e^{-\frac {3 a}{b n}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}} \]

[Out]

1/3*g^2*(e*x+d)^3*erfi(3^(1/2)*(a+b*ln(c*(e*x+d)^n))^(1/2)/b^(1/2)/n^(1/2))*3^(1/2)*Pi^(1/2)/e^3/exp(3*a/b/n)/
((c*(e*x+d)^n)^(3/n))/b^(1/2)/n^(1/2)+(-d*g+e*f)^2*(e*x+d)*erfi((a+b*ln(c*(e*x+d)^n))^(1/2)/b^(1/2)/n^(1/2))*P
i^(1/2)/e^3/exp(a/b/n)/((c*(e*x+d)^n)^(1/n))/b^(1/2)/n^(1/2)+g*(-d*g+e*f)*(e*x+d)^2*erfi(2^(1/2)*(a+b*ln(c*(e*
x+d)^n))^(1/2)/b^(1/2)/n^(1/2))*2^(1/2)*Pi^(1/2)/e^3/exp(2*a/b/n)/((c*(e*x+d)^n)^(2/n))/b^(1/2)/n^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.52, antiderivative size = 283, normalized size of antiderivative = 1.00, number of steps used = 14, number of rules used = 7, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {2401, 2389, 2300, 2180, 2204, 2390, 2310} \[ \frac {\sqrt {2 \pi } g e^{-\frac {2 a}{b n}} (d+e x)^2 (e f-d g) \left (c (d+e x)^n\right )^{-2/n} \text {Erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}+\frac {\sqrt {\pi } e^{-\frac {a}{b n}} (d+e x) (e f-d g)^2 \left (c (d+e x)^n\right )^{-1/n} \text {Erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}+\frac {\sqrt {\frac {\pi }{3}} g^2 e^{-\frac {3 a}{b n}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {Erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}} \]

Antiderivative was successfully verified.

[In]

Int[(f + g*x)^2/Sqrt[a + b*Log[c*(d + e*x)^n]],x]

[Out]

((e*f - d*g)^2*Sqrt[Pi]*(d + e*x)*Erfi[Sqrt[a + b*Log[c*(d + e*x)^n]]/(Sqrt[b]*Sqrt[n])])/(Sqrt[b]*e^3*E^(a/(b
*n))*Sqrt[n]*(c*(d + e*x)^n)^n^(-1)) + (g*(e*f - d*g)*Sqrt[2*Pi]*(d + e*x)^2*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*(d
 + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(Sqrt[b]*e^3*E^((2*a)/(b*n))*Sqrt[n]*(c*(d + e*x)^n)^(2/n)) + (g^2*Sqrt[Pi/3]
*(d + e*x)^3*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])])/(Sqrt[b]*e^3*E^((3*a)/(b*n))*Sq
rt[n]*(c*(d + e*x)^n)^(3/n))

Rule 2180

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/Sqrt[(c_.) + (d_.)*(x_)], x_Symbol] :> Dist[2/d, Subst[Int[F^(g*(e - (c*
f)/d) + (f*g*x^2)/d), x], x, Sqrt[c + d*x]], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !$UseGamma === True

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2300

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_), x_Symbol] :> Dist[x/(n*(c*x^n)^(1/n)), Subst[Int[E^(x/n)*(a +
b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rule 2310

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)*x)/n)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2401

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Int[Exp
andIntegrand[(f + g*x)^q*(a + b*Log[c*(d + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[
e*f - d*g, 0] && IGtQ[q, 0]

Rubi steps

\begin {align*} \int \frac {(f+g x)^2}{\sqrt {a+b \log \left (c (d+e x)^n\right )}} \, dx &=\int \left (\frac {(e f-d g)^2}{e^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}+\frac {2 g (e f-d g) (d+e x)}{e^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}+\frac {g^2 (d+e x)^2}{e^2 \sqrt {a+b \log \left (c (d+e x)^n\right )}}\right ) \, dx\\ &=\frac {g^2 \int \frac {(d+e x)^2}{\sqrt {a+b \log \left (c (d+e x)^n\right )}} \, dx}{e^2}+\frac {(2 g (e f-d g)) \int \frac {d+e x}{\sqrt {a+b \log \left (c (d+e x)^n\right )}} \, dx}{e^2}+\frac {(e f-d g)^2 \int \frac {1}{\sqrt {a+b \log \left (c (d+e x)^n\right )}} \, dx}{e^2}\\ &=\frac {g^2 \operatorname {Subst}\left (\int \frac {x^2}{\sqrt {a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{e^3}+\frac {(2 g (e f-d g)) \operatorname {Subst}\left (\int \frac {x}{\sqrt {a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{e^3}+\frac {(e f-d g)^2 \operatorname {Subst}\left (\int \frac {1}{\sqrt {a+b \log \left (c x^n\right )}} \, dx,x,d+e x\right )}{e^3}\\ &=\frac {\left (g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \operatorname {Subst}\left (\int \frac {e^{\frac {3 x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^3 n}+\frac {\left (2 g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \operatorname {Subst}\left (\int \frac {e^{\frac {2 x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^3 n}+\frac {\left ((e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \operatorname {Subst}\left (\int \frac {e^{\frac {x}{n}}}{\sqrt {a+b x}} \, dx,x,\log \left (c (d+e x)^n\right )\right )}{e^3 n}\\ &=\frac {\left (2 g^2 (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n}\right ) \operatorname {Subst}\left (\int e^{-\frac {3 a}{b n}+\frac {3 x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{b e^3 n}+\frac {\left (4 g (e f-d g) (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n}\right ) \operatorname {Subst}\left (\int e^{-\frac {2 a}{b n}+\frac {2 x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{b e^3 n}+\frac {\left (2 (e f-d g)^2 (d+e x) \left (c (d+e x)^n\right )^{-1/n}\right ) \operatorname {Subst}\left (\int e^{-\frac {a}{b n}+\frac {x^2}{b n}} \, dx,x,\sqrt {a+b \log \left (c (d+e x)^n\right )}\right )}{b e^3 n}\\ &=\frac {e^{-\frac {a}{b n}} (e f-d g)^2 \sqrt {\pi } (d+e x) \left (c (d+e x)^n\right )^{-1/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}+\frac {e^{-\frac {2 a}{b n}} g (e f-d g) \sqrt {2 \pi } (d+e x)^2 \left (c (d+e x)^n\right )^{-2/n} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}+\frac {e^{-\frac {3 a}{b n}} g^2 \sqrt {\frac {\pi }{3}} (d+e x)^3 \left (c (d+e x)^n\right )^{-3/n} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )}{\sqrt {b} e^3 \sqrt {n}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 252, normalized size = 0.89 \[ \frac {\sqrt {\pi } e^{-\frac {3 a}{b n}} (d+e x) \left (c (d+e x)^n\right )^{-3/n} \left (3 e^{\frac {2 a}{b n}} (e f-d g)^2 \left (c (d+e x)^n\right )^{2/n} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )+3 \sqrt {2} g e^{\frac {a}{b n}} (d+e x) (e f-d g) \left (c (d+e x)^n\right )^{\frac {1}{n}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )+\sqrt {3} g^2 (d+e x)^2 \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c (d+e x)^n\right )}}{\sqrt {b} \sqrt {n}}\right )\right )}{3 \sqrt {b} e^3 \sqrt {n}} \]

Antiderivative was successfully verified.

[In]

Integrate[(f + g*x)^2/Sqrt[a + b*Log[c*(d + e*x)^n]],x]

[Out]

(Sqrt[Pi]*(d + e*x)*(3*E^((2*a)/(b*n))*(e*f - d*g)^2*(c*(d + e*x)^n)^(2/n)*Erfi[Sqrt[a + b*Log[c*(d + e*x)^n]]
/(Sqrt[b]*Sqrt[n])] + 3*Sqrt[2]*E^(a/(b*n))*g*(e*f - d*g)*(d + e*x)*(c*(d + e*x)^n)^n^(-1)*Erfi[(Sqrt[2]*Sqrt[
a + b*Log[c*(d + e*x)^n]])/(Sqrt[b]*Sqrt[n])] + Sqrt[3]*g^2*(d + e*x)^2*Erfi[(Sqrt[3]*Sqrt[a + b*Log[c*(d + e*
x)^n]])/(Sqrt[b]*Sqrt[n])]))/(3*Sqrt[b]*e^3*E^((3*a)/(b*n))*Sqrt[n]*(c*(d + e*x)^n)^(3/n))

________________________________________________________________________________________

fricas [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2/(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="fricas")

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (co
nstant residues)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (g x + f\right )}^{2}}{\sqrt {b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2/(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="giac")

[Out]

integrate((g*x + f)^2/sqrt(b*log((e*x + d)^n*c) + a), x)

________________________________________________________________________________________

maple [F]  time = 0.58, size = 0, normalized size = 0.00 \[ \int \frac {\left (g x +f \right )^{2}}{\sqrt {b \ln \left (c \left (e x +d \right )^{n}\right )+a}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*x+f)^2/(b*ln(c*(e*x+d)^n)+a)^(1/2),x)

[Out]

int((g*x+f)^2/(b*ln(c*(e*x+d)^n)+a)^(1/2),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (g x + f\right )}^{2}}{\sqrt {b \log \left ({\left (e x + d\right )}^{n} c\right ) + a}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)^2/(a+b*log(c*(e*x+d)^n))^(1/2),x, algorithm="maxima")

[Out]

integrate((g*x + f)^2/sqrt(b*log((e*x + d)^n*c) + a), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {{\left (f+g\,x\right )}^2}{\sqrt {a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f + g*x)^2/(a + b*log(c*(d + e*x)^n))^(1/2),x)

[Out]

int((f + g*x)^2/(a + b*log(c*(d + e*x)^n))^(1/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (f + g x\right )^{2}}{\sqrt {a + b \log {\left (c \left (d + e x\right )^{n} \right )}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*x+f)**2/(a+b*ln(c*(e*x+d)**n))**(1/2),x)

[Out]

Integral((f + g*x)**2/sqrt(a + b*log(c*(d + e*x)**n)), x)

________________________________________________________________________________________